package com.fiidee.blog.service;

import com.fiidee.blog.dto.UserDTO;
import com.fiidee.blog.entity.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * Created by zzb on 2015/5/26.
 */
public interface UserService extends BaseService<User,UserDTO>{

    /**登陆*/
    int doLogin(String loginCode,String password,HttpServletResponse response);
    /**注销*/
    int doLogout( HttpServletResponse response);
    /**修改秘密*/
    int doModifyPassword(Integer userId, String oldPassword, String newPassword);
    /**修改邮件*/
    int doModifyEmail(Integer userId,String password,String newEmail);
    /**修改电话号码*/
    int doModifyMobile(Integer userId,String password,String newMobile);
    /**修改头像*/
    int doModifyAvatar(Integer userId , String imgUrl  ,HttpServletResponse response);
    /**修改用户信息*/
    int doModifyInfo(Integer userId,
                     String name,
                     String alias,
                     String realname,
                     String role,
                     String email,
                     String number,
                     String summary);
    /**寻找用户*/
    List<User> findUser(String name);

    List<Map<String,Object>> getRecommendUser();

    Map<String,Object> getUserInfo(Integer userid);
}
